package com.meixiang.activity.account.manager;

import android.os.Bundle;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.view.View;

import com.meixiang.R;
import com.meixiang.adapter.PromotionAdapter;
import com.meixiang.main.BaseActivity;
import com.meixiang.view.swipetoloadlayout.base.SwipeToLoadLayout;

import butterknife.Bind;
import butterknife.ButterKnife;

/**
 * 优惠促销
 * author：wangzuzhen on 2016/5/6 0006 10:33.
 */
public class PromotionsActivity extends BaseActivity {

    @Bind(R.id.swipe_target)
    RecyclerView mSwipeTarget;
    @Bind(R.id.refresh)
    SwipeToLoadLayout mRefresh;

    private PromotionAdapter mAdapter;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        setContentView(R.layout.activity_promotion);
        ButterKnife.bind(this);
        super.onCreate(savedInstanceState);
    }

    @Override
    protected void initTitle() {
        setTitle("优惠促销");
    }

    @Override
    protected void initView() {
        mAdapter = new PromotionAdapter(context);
        RecyclerView.LayoutManager layoutManager = new LinearLayoutManager(context);
        mSwipeTarget.setLayoutManager(layoutManager);
        mSwipeTarget.setAdapter(mAdapter);
        mAdapter.setOnItemClickListener(new PromotionAdapter.OnItemClickListener() {
            @Override
            public void onItemClick(View view, int position) {
                //详情
            }
        });
    }

    @Override
    protected void setData() {

    }

    @Override
    public void onClick(View v) {

    }
}
